class Person {
  constructor(name){
    this.name = name
  }
  sayHello(){
    console.log(`hi,my name is ${this.name}`)
  }
  static of(name){
    console.log(name)
    return new Person(name)
  }
}
class Student extends Person {
  constructor(name,number) {
    super(name)
    this.number = number
  }
  say(){
    super.sayHello()
    console.log(`my number is ${this.number}`)
  }
}
const s = new Student('liqiang',123456)
s.say()
const s2 = Student.of('liulan')
s2.sayHello()